1. Field of the Invention
This invention relates to an anomaly monitoring device which detects anomalies of pulse encoders (hereafter simply called “encoders”) and anomalies of wiring systems to implement safety functions in, for example, a power converter such as an inverter and a servo system for driving a motor.
2. Description of the Related Art
Inverters and servo systems which compute motor speed and rotor position from output signals of a pulse encoder mounted on the output shaft of a motor, and which feed back these computed values in variable-speed driving of the motor, are in widespread use. In such devices, normal equipment operation is difficult if there are anomalies in the encoder output signals, and so in the past various proposals have been made for methods to detect anomalies in encoders and anomalies in wiring systems, to halt operation.
For example, in Japanese Patent Application Laid-open No. 2008-232978, a wiring anomaly detection device is disclosed in which, by utilizing internal functions of a microprocessor for anomaly monitoring, the number of components can be reduced, circuits can be reduced to the bare minimum, and cost can be decreased.
In this technology of the prior art (for convenience, called the first conventional technology), first the encoder output signal is input to the wiring anomaly detection device as an analog signal. Then, the analog signal is A/D (analog/digital)-converted, and if the converted voltage level is a prescribed intermediate voltage level excluding transient states, then it is judged that incomplete contact or a short-circuit is occurring in the signal system, and an anomaly is detected.
Below, the configuration and operation of a circuit of this conventional technology is explained, referring to FIG. 23.
In FIG. 23, the wiring anomaly detection device 100 includes a microprocessor 120, program memory 121, AD converter 123, constant-voltage power supply circuit 130, buffer amplifier 135, series resistors 131a, 131b, filter capacitors 132a, 132b, and pull-down resistors 134a, 134b. Also, 122 is memory within the microprocessor 120.
Further, 110 is a rotary encoder used to detect the rotation angle of the motor (not shown). This encoder 110 includes a rotation angle detection circuit 115, which outputs signals with two phases (A phase and B phase) as rotation angle detection signals; sensor switches 111a, 111b, as transistors for A phase and B phase signal output; dropper diodes 112a, 112b, 113a, 113b; and bleeder resistors 114a, 114b. 
Further, 101 is a DC power supply, 102 is a power supply switch, 103 is a ground line, 104 is a power supply line, and 105 and 106 are signal lines.
Also, A and B in the encoder 110 are output terminals for A phase signals and B phase signals. A1 and A2 in the wiring anomaly detection device 100 are analog input signals, D1 and D2 in the microprocessor 120 are open/close logic signals for the sensor switches 111a, 111b, and Vm is a monitored voltage.
As the operation of the rotary encoder 110, when the sensor switches 111a, 111b are turned on or off by output signals of the rotation angle detection circuit 115, through action of the dropper diodes 112a, 112b, 113a, 113b and the bleeder resistors 114a, 114b, a voltage drop occurs. The voltage of this voltage drop is output from the output terminals A, B as the A phase signal and B phase signal, and by inputting the voltage to the wiring anomaly detection device 100 via the signal lines 105, 106, anomaly detection operation is performed as described below.
FIG. 24 shows characteristics of the analog input signals A1, A2 of the A phase and B phase input to the wiring anomaly detection device 100. Below, characteristics of the analog input signal A1 for the A phase are explained, but operation is entirely similar for the analog input signal A2 of the B phase.
When the sensor switch 111a turns on, the on-voltage drop across the dropper diode 112a causes the voltage VL of FIG. 24 to be detected. On the other hand, when the sensor switch 111a turns off, the voltage drop across the bleeder resistor 114a and dropper diode 113a causes the voltage level VH to be detected. In actuality, taking scattering in the characteristics of the dropper diodes 112a, 113a into consideration, constant ranges centered on the voltage levels VL and VH are taken to be the normal “L” level and the normal “H” level respectively.
By judging whether the voltage level of an analog input signal is “L” level or “H” level in this way, the presence or absence of a rotation angle detection pulse is detected.
At this time, when for example a line break or ground fault is occurring in the signal line 105, the above-described voltage drop component is not detected, and the analog input signal is fixed at ground level, so that anomaly occurrence can be detected.
And, when the output terminal A of the encoder 110 is short-circuited to the positive-side power supply Vcc, the analog input signal is fixed at a voltage level higher than VH, so that occurrence of an anomaly can similarly be detected. Further, when there is incomplete contact with the positive-side power supply Vcc and with ground, or when contact with another signal line occurs, the analog input signal is detected as the intermediate voltage level (logic judgment level) Vs1 or Vs2 in FIG. 24, and an anomaly is also judged when these intermediate voltage levels Vs1 or Vs2 continue for a fixed period.
During on/off switching of the sensor switch 111a, the voltage waveform of the A phase analog input signal A1 is filtered by the low-pass filter including the series resistor 131a and the filter capacitor 132a. Hence depending on the sampling timing, the intermediate voltage levels Vs1 and Vs2 may be detected transiently even during normal operation, so that there is the concern that an anomaly may be erroneously detected as a result.
In order to prevent such erroneous detection, when in this conventional technology an intermediate voltage level Vs1 or Vs2 is detected, detailed judgment is executed. And, a judgment is made as to whether the intermediate voltage level Vs1 or Vs2 has occurred transiently or has continued for a fixed period; if the level has continued for a fixed period, the above-described anomaly due to incomplete contact with the positive-side power supply Vcc or ground, or due to contact with another signal line, is judged to have occurred.
In other conventional technology (for convenience, called the second conventional technology), a method is known in which, after two-phase signals output from an encoder (an A phase signal and B phase signal with different phases) are A/D converted, the signals are input to a separate counter and the number of pulses counted for each over a fixed period, and anomalies are detected based on these numbers of pulses.
For example, when the motor is rotating, numbers of pulses corresponding to the rotation speed are measured as A phase signals and B phase signals; but when the signal line for one of the phases breaks or comes into contact with the power supply line or ground line, errors occur in the number of pulses for each phase. Hence by comparing the number of pulses for each phase, anomalies can be detected. Further, by comparing the speed detection values equivalent to the numbers of pulses for each phase with the current speed instruction value or another value, anomalies not only in one of the phases alone, but simultaneous anomalies in the two phases can also be detected.
Next, problems with these conventional technologies are explained.
By means of the first conventional technology, even when the motor is stopped, a wiring anomaly can be detected according to the voltage level of the analog signal input to the wiring anomaly detection device 100. However, during operation of the motor, wiring anomaly judgment is difficult, and even when wiring is normal there is the concern that an erroneous judgment of an anomaly may be made. The reason for this is as follows.
For encoders in general, the number of output signals per single mechanical period (in the case of a rotary motor, per single rotation) of a motor or other rotation member is determined, and as the speed increases the interval between output signals becomes shorter. On the other hand, a microprocessor or other processing unit normally performs processing in a fixed period, so that it does not infrequently occur that the interval of output signals from the encoder become much shorter than the processing period of the processing unit.
If at such times the sampling timing of the AD converter on the processing unit side happens to coincide with the time at which the output signal from the encoder changes, an intermediate voltage level is detected continuously, as described above, and so there are cases in which it is erroneously judged that an anomaly has occurred, even though the wiring system is normal.
FIG. 25 is a timing chart showing the encoder output signal, AD conversion sampling timing, the power supply voltage Vc, the detected value of the voltage level of the analog input signal, and the ground level at the time of the above-described erroneous judgment.
As shown in the figure, when the period of the AD conversion sampling timing is a specific multiple of the period of the encoder output signals, the detected values at each of the sampling timings are the same, and so there is the possibility that the voltage value of the analog input signal will be erroneously regarded as fixed at an intermediate voltage level (that is, anomalous).
In order to avoid such erroneous judgments and enhance the reliability of the device, use of a fast AD converter with a short sampling timing period is effective; but fast AD converters are generally expensive, and so there is the problem that the device cost is increased.
On the other hand, in the second conventional technology, due to the principle of anomaly detection based on the numbers of pulses for two phases, anomaly detection is not possible in a state in which the motor is stopped. Hence means of anomaly detection while the motor is stopped must be separately prepared, and this results in increased costs.
Further, if the first conventional technology and the second conventional technology are combined, then an anomaly detection device can be configured which can be employed both when the motor is operating and when the motor is stopped; however, anomaly detection is not possible in cases such as the following.
(1) Case in which the phase of the two-phase output signals of the encoder are anomalous
This is a case in which, due to partial short-circuiting of a signal line for example, the interval between the output signals of the two phases fluctuates temporarily.
In this case, the anomaly can only be detected when output signals from the encoder appear due to operation of the motor; and detection is not possible merely by comparing numbers of pulses, as in the second conventional technology.
(2) In this case, ordinarily a difference should appear between the numbers of pulses for the two phases due to the anomaly, but because of noise or other causes the output signals oscillate, and so the numbers of pulses for the two phases coincide.
In addition to the above, there are other cases as well in which for other reasons, no difference occurs in the number of pulses during occurrence of an anomaly, so that the anomaly cannot be detected.